<template>
	<view class="page">
		<view class="title">{{info.title}}</view>
		<view class="tit-info flex between">
			发布时间：{{info.create_time}} 
			<view>阅读：{{info.pv}} 次</view>
			</view>
		<view class="content">
			<rich-text :nodes="info.content"></rich-text>
		</view>
	</view>
</template>

<script>
	import {
		articleDetail
	} from '@/api/apiData.js';
	export default {
		data() {
			return {
				info: ''
			}
		},
		onLoad(option) {
			this.article_id = option.id
			this.getInfo()
		},
		methods: {
			async getInfo() {
				const result = await articleDetail({
					article_id: this.article_id
				})
				this.info = result.data
			},
		}
	}
</script>

<style lang="less" scoped>
	.page{
		padding: 32rpx;
	}
	.title {
		font-size: 32rpx;
		// text-align: center;
		font-weight: bold;
	}

	.tit-info {
		font-size: 26rpx;
		// text-align: center;
		margin: 16rpx 0 30rpx;
		color: grey;
	}
	.content {
		font-size: 28rpx;
	}
</style>